/**
 * \file
 *
 * \brief 数码管显示程序
 *
 * \author 高明飞
 *
 * \date 2015-09-25
 *
 * 修改记录：\n
 *
 */
 
#include "Digitron.h"
#include "DigitronTable.h"


/** 存储需要显示的内容, 0xFF代表不显示 */
volatile uint8_t DigitronDisplay[6] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};

/**
 * 根据DigitronDisplay中的内容刷新显示
 */
void Digitron_Refresh(void)
{
	uint8_t i;
	uint16_t k;
	
	for(i = 0; i < 6; i++)
	{
		COMList = (~(0x01 << i));
		if(DigitronDisplay[i] != 0xFF)
			COMData = DigitronTable[DigitronDisplay[i]];
		else
			COMData = 0xFF;
		for(k = 0; k < 100; k++);
	}
	COMList = 0xFF;
}

